package org.aizuomeng.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 系统日志表
 * </p>
 *
 * @author luhaolong
 * @since 2021-11-20 15:19:52
 */
@Getter
@Setter
@TableName("sys_log")
@ApiModel(value = "SysLog对象", description = "系统日志表")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.NONE)
    private String id;

    @ApiModelProperty("日志类型（1登录日志，2操作日志）")
    @TableField("log_type")
    private Integer logType;

    @ApiModelProperty("日志内容")
    @TableField("log_content")
    private String logContent;

    @ApiModelProperty("操作类型")
    @TableField("operate_type")
    private Integer operateType;

    @ApiModelProperty("操作用户账号")
    @TableField("userid")
    private String userid;

    @ApiModelProperty("操作用户名称")
    @TableField("username")
    private String username;

    @ApiModelProperty("IP")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("请求java方法")
    @TableField("method")
    private String method;

    @ApiModelProperty("请求路径")
    @TableField("request_url")
    private String requestUrl;

    @ApiModelProperty("请求参数")
    @TableField("request_param")
    private String requestParam;

    @ApiModelProperty("请求类型")
    @TableField("request_type")
    private String requestType;

    @ApiModelProperty("耗时")
    @TableField("cost_time")
    private Long costTime;

    @ApiModelProperty("创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("更新人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


}
